﻿import React from 'react'
import {Button} from '@/components'

class DemoButton extends React.Component {
    test() {
        return new Promise(resolve => {
            setTimeout(() => {
                resolve()
                alert('呵呵')
            }, 2000)

        })
    }

    render() {
        return (
            <div className="btn-group">
                <Button type="primary" icon="copy" iconAlign="right"
                        onClick={this.test.bind(this)}> primary </Button>
                <Button type="default" icon="edit" onClick={() => alert(1)}>default</Button>
                <Button type="success" icon="edit" onClick={() => alert(1)}>success</Button>
                <Button type="danger" icon="edit">danger</Button>
                <Button type="warning" icon="edit" onClick={() => alert(1)}>warning</Button>
                <Button type="info" icon="edit" onClick={() => alert(1)}>info</Button>
                <Button type="yellow" icon="edit" onClick={() => alert(1)}>yellow</Button>
                <Button type="purple" icon="edit" onClick={() => alert(1)}>purple</Button>
                <Button type="azure" icon="edit" onClick={() => alert(1)}>azure</Button>
                <Button type="black" icon="edit" onClick={() => alert(1)}>black</Button>
            </div>
        )
    }
}

export default DemoButton
